<h1>Listing regions</h1>

<table>
  <tr>
    <th>X</th>
    <th>Y</th>
    <th>Width</th>
    <th>Height</th>
    <th>Type</th>
    <th>Extra data</th>
  </tr>

<% for region in @regions %>
  <tr>
    <td><%=h region.x %></td>
    <td><%=h region.y %></td>
    <td><%=h region.width %></td>
    <td><%=h region.height %></td>
    <td><%=h region.region_type %></td>
    <td><%=h region.extra_data %></td>
    <td><%= link_to 'Show', book_page_region_path(region.book_id, region.page_id, region) %></td>
    <td><%= link_to 'Edit', edit_book_page_region_path(region.book_id, region.page_id, region) %></td>
    <td><%= link_to 'Destroy', book_page_region_path(region.book_id, region.page_id, region), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New region', new_book_page_region_path(params[:book_id], params[:page_id]) %>
